package shopping.service.interfaces;

import java.util.List;
import java.util.Map;

import shopping.entity.User;

public interface IUserService {
	
	/**
	 * 登陆
	 * @param custName
	 * 		用户名
	 * @return
	 */
	 User login(String userName);

	 /**
		 * 插入
		 */
		 void save(User User);
		 
		 /**
		  * 按id删除
		  */
		 void deleteById(User User);
		 
		 /**
		  * 修改
		  */
		 void update(User User);
		 
		 /**
		  * 按id查询
		  * @param roleId
		  * @return
		  */
		 User queryById(int roleId);
		
		 /**
		  * 条件查询
		  * @return
		  */
		 List<User> findByHql(Class<User> cla,Map<String, Object> map);
		 
		 List<User> findByHqlPage(Map<String,Object> columsAndValues ,final int offset, final int pageSize);
		 
		 public int countByHql(Map<String,Object> columsAndValues);
	
}
